package cn.akwangl.design.pattern.behavioral.chainresponsibility.v2;

/**
 * 责任链模式#v2
 *
 * @author youyongkun
 * @date 2021/12/7 10:42
 */
public class LeaveApprovalTest {
    public static void main(String[] args) {
        // 组装责任链
        Leader leader1 = new ClassAdviser();
        Leader leader2 = new DepartmentHead();
        Leader leader3 = new Dean();

        leader1.setNext(leader2);
        leader2.setNext(leader3);

        leader1.handleRequest(10);
    }
}
